package com.example.springai.http.pojo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;

@Data
public class ChatFullRequest {

    private String model;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String toolChoice;
    private List<Message> messages;

    @Data
    public static class Message {
        private String role;
        @JsonInclude(JsonInclude.Include.NON_NULL)
        private String content;

        @JsonProperty("tool_calls")
        @JsonInclude(JsonInclude.Include.NON_NULL)
        private List<ToolCall> toolCalls;
        @JsonProperty("tool_call_id")
        @JsonInclude(JsonInclude.Include.NON_NULL)
        private String toolCallId;
    }

    @Data
    public static class ToolCall {
        private int index;
        private String id;
        private String type;
        private Function function;

        @Data
        public static class Function {
            private String name;
            private String arguments;
        }
    }
}
